//
//  WeiboAnnoation.m
//  Project_2_weibo
//
//  Created by 林林 on 16/7/8.
//  Copyright © 2016年 lhn. All rights reserved.
//

#import "WeiboAnnoation.h"

@implementation WeiboAnnoation

- (void)setWeibo:(Weibo *)weibo {
    
    _weibo = weibo;
    NSDictionary *geo = weibo.geo;
    NSArray *array = geo[@"coordinates"];
    if (array.count == 2) {
        
        NSString *lat = [array firstObject];
        NSString *lon = [array lastObject];
        
        //创建位置信息
        _coordinate = CLLocationCoordinate2DMake([lat doubleValue], [lon doubleValue]);
    }
}

@end
